/**
 */
package gatperdut.chato.model.Chato.Item.impl;

import gatperdut.chato.model.Chato.Item.BoxInventory;
import gatperdut.chato.model.Chato.Item.Item;
import gatperdut.chato.model.Chato.Item.ItemPackage;
import java.util.Collection;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Box Inventory</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gatperdut.chato.model.Chato.Item.impl.BoxInventoryImpl#getItems <em>Items</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class BoxInventoryImpl extends GenericBoxInventoryImpl implements BoxInventory {
    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    protected BoxInventoryImpl() {
        super();
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected EClass eStaticClass() {
        return ItemPackage.Literals.BOX_INVENTORY;
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @SuppressWarnings("unchecked")
    public EList<Item> getItems() {
        return (EList<Item>)eDynamicGet(ItemPackage.BOX_INVENTORY__ITEMS, ItemPackage.Literals.BOX_INVENTORY__ITEMS, true, true);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case ItemPackage.BOX_INVENTORY__ITEMS:
                return getItems();
        }
        return super.eGet(featureID, resolve, coreType);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @SuppressWarnings("unchecked")
    @Override
    public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case ItemPackage.BOX_INVENTORY__ITEMS:
                getItems().clear();
                getItems().addAll((Collection<? extends Item>)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public void eUnset(int featureID) {
        switch (featureID) {
            case ItemPackage.BOX_INVENTORY__ITEMS:
                getItems().clear();
                return;
        }
        super.eUnset(featureID);
    }

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    public boolean eIsSet(int featureID) {
        switch (featureID) {
            case ItemPackage.BOX_INVENTORY__ITEMS:
                return !getItems().isEmpty();
        }
        return super.eIsSet(featureID);
    }

} //BoxInventoryImpl
